<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "arc_keyword".
 *
 * @property int $id 关键字的ID
 * @property string $name 关键字的名称
 * @property int $seriousness_id 外键关联的严重程度ID
 */
class ArcKeyword extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'arc_keyword';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['seriousness_id'], 'integer'],
            [['name'], 'string', 'max' => 40],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => '关键字',
            'seriousness_id' => '严重程度',
            'names'=>'严重程度',
        ];
    }
    /**
     * 关联表
     */
    /**
     * @return int
     */
    public function getAsrSeriousness()
    {
        return $this->hasOne(AsrSeriousness::className(),['id' => 'seriousness_id']);
    }
}
